import Vue from 'vue'
import Router from 'vue-router'
import VDistpicker from 'v-distpicker'
//第一个是组件名  后面的是文件名
//导入
import Llist from '@/components/fenlei/Llist.vue'
import Rcontent from '@/components/fenlei/second/Rcontent.vue'
import Rcontent2 from '@/components/fenlei/second/Rcontent2.vue'
import Sales from '@/components/fenlei/sales'
import torder from '@/components/fenlei/horder/torder'
import Worder from '@/components/fenlei/horder/writeorder.vue'
import Pworder from '@/components/fenlei/horder/Pworder.vue'
import select1 from '@/components/fenlei/select1.vue'
import select2 from '@/components/fenlei/select2.vue'
import DianHeader from '@/components/fenlei/dianpu/DianHeader.vue'
import Dianinfro from '@/components/fenlei/dianpu/Dianinfro.vue'
import comments from '@/components/fenlei/second/comments.vue'
import goods from '@/components/fenlei/second/goods.vue'
import priceup from '@/components/fenlei/second/priceup.vue'
import pricedown from '@/components/fenlei/second/pricedown.vue'
import dizhi from '@/components/fenlei/second/dizhi.vue'

import HelloWorld from '@/components/liu/SearchBox'
import images from '@/components/liu/Advertising'
import detail from '@/components/liu/DetailPage'
import Goshopping from '@/components/liu/ShoppingCar'
import Gocar from '@/components/liu/MyShoppingCar'
import Footer from '@/components/liu/Footer'
import fan from '@/components/liu/FanHui'
import zhifu from '@/components/liu/DingDan'
import  tan from '@/components/liu/tanchuang'

import Login from '@/components/Login/Login'
import Userzhuce from '@/components/Login/userzhuce/Userzhuce'
import zhanghao from '@/components/Login/userzhuce/zhanghao'
import user from '@/components/Login/user'
import mima from '@/components/Login/zhaohuimima'
import yanzheng from '@/components/Login/yanzheng'
import chongzhi from '@/components/Login/chongzhi'
import usergeren from '@/components/usergeren/usergeren'
import daifukuan from '@/components/usergeren/daifukuan'
import daishouhuo from '@/components/usergeren/daishouhuo'
import yiwancheng from '@/components/usergeren/yiwancheng'
import tuikuan from '@/components/usergeren/tuikuan'
import shouhuodizhiguanli from '@/components/usergeren/shouhuodizhiguanli'
import wodeshoucang from '@/components/usergeren/wodeshoucang'
import lianxikefu from '@/components/usergeren/lianxikefu'
import bianjidizhi from '@/components/usergeren/bianjidizhi'
import zhifufangshi from '@/components/usergeren/zhifufangshi'

import Header from '@/components/Header/Header'
import app from '@/components/Header/app'
import Bottom from '@/components/Header/Bottom'
import goTop from '@/components/Header/goTop'
import Swiper from '@/components/Header/Swiper'
import VueJsonp from 'vue-jsonp'

//注册全局组件
Vue.component('v-distpicker', VDistpicker)
Vue.component('Fun',fan)
Vue.component('Tan',tan)




//使用注册
Vue.use(Router)


//配置路由 
export default new Router({
	routes: [{
			path: '/',
			name: 'Header',
			components: {
				first: Header
			}
		},
		{
			path: '/Llist',
			name: 'Llist',
			components: {
				first: Llist
			},
			children: [{
					path: '/Rcontent',
					name: 'Rcontent',
					components: {
						second: Rcontent
					}
				},
				{
					path: "/Rcontent2",
					name: "Rcontent2",
					components: {
						second: Rcontent2
					}
				}
			],
			redirect: "/Rcontent"
		}, {
			path: "/sales",
			name: 'sales',
			components: {
				first: Sales
			},
	},
	
		{
				path:"/dizhi",
				name:"dizhi",
				components:{
				first:dizhi
					}
			},
		{
			path: '/Login',
			name: 'Login',
			components: {
				first: Login
			},
			children: [{
				path: '/zhanghao',
				name: 'zhanghao',
				components: {
					second: zhanghao
				}
			}, {
				path: '/userzhuce',
				name: 'Userzhuce',
				components: {
					second: Userzhuce
				}
			}],redirect: "/userzhuce"
		}, {
			path: "/user",
			components: {
				first: user
			}
		}, {
			path: "/yanzheng/:name",

			path: "/yanzheng/:phone",

			components: {
				first: yanzheng
			}
		}, {
			path: "/mima",
			components: {
				first: mima
			}
		}, {
			path: "/chongzhi/:name",
			components: {
				first: chongzhi
			}
		},
		{
			path: '/search',
			name: 'search',
			components: {
				first: HelloWorld
			}
		},
		{
			path: '/list',
			name: 'guanggao',
			components: {
				first: images
			}
		},
		{
			path: '/detail',
			name: 'detail',
			components: {
				first: detail
			},
			children:[{
				path: '/dizhi',
				name: 'dizhi',
				components: {
					second: dizhi
				}
			}]
		},
		{
			path: '/writeorder',
			name: 'writeorder',
			components: {
				first: Worder
			}
		}, {
			path: '/torder ',
			name: 'torder',
			components: {
				first: torder
			}
		},
		{
			path: '/Pworder',
			name: 'Pworder',
			components: {
				first: Pworder
			}
		},
		{
			path: '/select2',
			name: 'select2',
			components: {
				first: select2
			}
		},
		{
			path: '/select1',
			name: 'select1',
			components: {
				first: select1
			}
		},
		{
			path: "/DianHeader",
			name: "DianHeader",
			components: {
				first: DianHeader
			}
		},
		{
			path: "/Dianinfro",
			name: "Dianinfro",
			components: {
				first: Dianinfro
			}
		},
		{
			path: "/comments",
			name: "comments",
			components: {
				first: comments
			}
		},
		{
  	path:'/app',
  	name:'app',
  	components:{
  		first:app
  	}
  },{
    	path:"/usergeren",
    		components:{
	    			first:usergeren
	    	}
    },{
    	path:"/daifukuan",
    		components:{
	    			first:daifukuan
	    	}
    },{
    	path:"/daishouhuo",
    		components:{
	    			first:daishouhuo
	    	}
    },
    {
    	path:"/yiwancheng",
    		components:{
	    			first:yiwancheng
	    	}
    },{
    	path:"/tuikuan",
    		components:{
	    			first:tuikuan
	    	}
    },{
    	path:"/shouhuodizhiguanli",
    		components:{
	    			first:shouhuodizhiguanli
	    	}
    },{
    	path:"/wodeshoucang",
    		components:{
	    			first:wodeshoucang
	    	}
 },{
    	path:"/lianxikefu",
    		components:{
	    			first:lianxikefu
	    	}
   },{
    	path:"/bianjidizhi",
    		components:{
	    			first:bianjidizhi
	    	}
   },
    {
      path: '/car',
      name: 'car',
        components: {
      	first: Gocar
    		}
     },{
      path: '/shopping',
      name: 'shopping',
        components: {
      	first: Goshopping
    		}
      },
 {
     	path: '/zhifu',
        name: 'zhifu',
        components: {
      	first: zhifu
    		}
    },
    {
     	path: '/tan',
        name: 'tan',
        components: {
      	first: tan
    		}
    },{
	path: '/zhifufangshi',
	name: 'zhifufangshi',
	components: {
		first: zhifufangshi
		}
	}
	]
})

